﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>ECharts</title>
    
</head>

<body>
    <!--Step:1 Prepare a dom for ECharts which (must) has size (width & hight)-->
    <!--Step:1 为ECharts准备一个具备大小（宽高）的Dom-->
    <div id="main" style="width: 400px; height:400px; border:1px solid #ccc;padding:10px;"></div>
    <div id="mainMap" style="height:500px;border:1px solid #ccc;padding:10px;"></div>
    
    <!--Step:2 Import echarts.js-->
    <!--Step:2 引入echarts.js-->
    
    <!--
    	<script src="http://echarts.baidu.com/build/dist/echarts.js"></script>
    -->
    <script src="js/echarts.js"></script>
    <script type="text/javascript">
        require.config({
            paths: {
                echarts: 'js'
                // echarts: 'http://echarts.baidu.com/build/dist'
            }
        });
         require(
            [
                'echarts',
                'echarts/chart/funnel',   
                'echarts/chart/pie',
                'echarts/chart/line'
            ],
            function (ec) {
                var myChart = ec.init(document.getElementById('main'));
              var  option = {
legend: {		
	    	show:true,
	        orient : 'vertical',  
	        x :'left',		
	        y :'top',		
	         data: ["下载量", "全数据平均值","全数据最大值", "全数据最小值"]
  },
  series: [
    {
      "name": "下载量",
      "type": "pie",
      data:[
        {"name": "下载量", "value": 126},
        { "name": "全数据平均值","value": 195},
        { "name": "全数据最大值","value": 1356},
        {"name": "全数据最小值", "value": 3}
      ]
    }
  ]
}; 
               myChart.setOption(option);
      
            }
        );
      
    </script>
   
</body>
</html>